function onnx_clone() {
    echo "onnx_clone entry"

    url="https://github.com/onnx/onnx.git"
    cd $HOME/gits/github
    echo git clone "${url}"
    git clone "${url}"
}

function onnx_update() {
    echo "onnx_update entry"

    cd $HOME/gits/github/onnx

    echo git submodule update --init --recursive
    git submodule update --init --recursive

    echo git pull
    git pull
}

function resnet50_infer() {
    echo "resnet50_infer entry"

    export PATH=${HOME}/bin:${HOME}/anaconda3/bin:${HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda/bin

    # 进入py38
    . ${HOME}/bin/enter_py38.sh 
    cd "$HOME/onnx-quants-3.8/ws-dev/onnx-quantization/onnx_quantize_tool"

    # 64 float
    echo python run_quantization.py -m models/resnet50_rne_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu -1
    python run_quantization.py -m models/resnet50_rne_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu -1

#   echo python run_quantization.py -m models/resnet50_rne_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu 0
#   python run_quantization.py -m models/resnet50_rne_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu 0

#   # 64 quant 
#   echo python run_quantization.py -m models/resnet50_rne_quantize_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu -1
#   python run_quantization.py -m models/resnet50_rne_quantize_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu -1

#   echo python run_quantization.py -m models/resnet50_rne_quantize_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu 0
#   python run_quantization.py -m models/resnet50_rne_quantize_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu 0

#   # 64 quant speed
#   echo python run_quantization.py -m models/resnet50_rne_quantize_speed_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu -1
#   python run_quantization.py -m models/resnet50_rne_quantize_speed_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu -1

#   echo python run_quantization.py -m models/resnet50_rne_quantize_speed_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu 0
#   python run_quantization.py -m models/resnet50_rne_quantize_speed_b64.onnx -r infer -if infer_test_float_new_time -d datas/f32_64x3x224x224.npy -i 10 -l 1 --gpu 0

#   # 128 quant speed
#   echo python run_quantization.py -m models/resnet50_rne_quantize_speed_b128.onnx -r infer -if infer_test_float_new_time -d datas/f32_128x3x224x224.npy -i 10 -l 1 --gpu -1
#   python run_quantization.py -m models/resnet50_rne_quantize_speed_b128.onnx -r infer -if infer_test_float_new_time -d datas/f32_128x3x224x224.npy -i 10 -l 1 --gpu -1

#   echo python run_quantization.py -m models/resnet50_rne_quantize_speed_b128.onnx -r infer -if infer_test_float_new_time -d datas/f32_128x3x224x224.npy -i 10 -l 1 --gpu 0
#   python run_quantization.py -m models/resnet50_rne_quantize_speed_b128.onnx -r infer -if infer_test_float_new_time -d datas/f32_128x3x224x224.npy -i 10 -l 1 --gpu 0

    # 退出py38
    . ${HOME}/bin/quit_py38.sh
}
